#ifndef _CMD_MAP_RW_H__
#define _CMD_MAP_RW_H__

#include <stdint.h>

typedef enum {
    CMD_MAP_CHARGE = 1,
    CMD_MAP_PWR,
    CMD_MAP_BMS,
    CMD_MAP_MAX
} CmdMapType;

typedef enum {
    CMD_REG_SET_BIT = 1,
    CMD_REG_CLEAR_BIT
} CmdRegBitChange;

int general_cmd_map_set(CmdMapType type, uint8_t start_index, uint8_t *set_val, uint16_t set_len);
int general_cmd_map_get(CmdMapType type, uint8_t start_index, uint8_t *get_val, uint16_t get_len);
int general_cmd_reg_change_bit(CmdMapType type, uint8_t index, uint16_t bitmask, CmdRegBitChange change);
int general_cmd_reg_test_bit(CmdMapType type, uint8_t index, uint16_t bitmask);
int general_bms_ext_map_get_reg(CmdMapType type, uint8_t index, uint16_t *get_val);
int general_mebike_bms_ext_map_get_reg(CmdMapType type, uint8_t index, uint16_t *get_val);

#endif /* _CMD_MAP_RW_H__ */

